package net.xdclass.rbac_shiro.config;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;
import java.util.UUID;

/**
 * @program: rbac_shiro
 * @description: 自定义SessionId生成
 * @author: rZ
 * @create: 2020-01-14 15:43
 **/
public class CustomSessionIdGenerator implements SessionIdGenerator {

    @Override
    public Serializable generateId(Session session) {
        return "xdclass"+ UUID.randomUUID().toString().replaceAll("-","");
    }
}
